﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HML.Demo
{
    public class TabControlPlusExt : TabControlPlus
    {

        protected override void OnTabItemDrawBackgroundAfter(TabItemDrawBackgroundAfterEventArgs e)
        {
            base.OnTabItemDrawBackgroundAfter(e);

            if (this.TabPages[this.SelectedIndex] == e.TabPage && e.TabPage != null)
            {
                int height = (int)(Math.Ceiling(3 * this.ScaleDpi));
                SolidBrush line_sb = new SolidBrush(Color.FromArgb(110, 153, 153));
                e.Graphics.FillRectangle(line_sb, new RectangleF(e.ClipBounds_P.X, e.ClipBounds_P.Bottom - height, e.ClipBounds_P.Width, height));
                line_sb.Dispose();
            }
        }

    }

}
